<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>项目手动打分（项目列表）-项目管理</title>
<link href="/rating/Public/admin/css/style.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="/rating/Public/admin/js/jquery.js"></script>

<link href="/rating/Public/admin/css/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/rating/Public/admin/js/jquery.idTabs.min.js"></script>
<script type="text/javascript" src="/rating/Public/admin/js/select-ui.min.js"></script>

<link href="/rating/Public/validform/Validform.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/rating/Public/validform/Validform_v5.3.2.js"></script>
<script type="text/javascript" src="/rating/Public/validform/Validform_Datatype.js"></script>
<script type="text/javascript" src="/rating/Public/My97DatePicker/WdatePicker.js"></script>
<script>
$(document).ready(function(e) {
    $("#indus_id,#item_province,#item_city").uedSelect({
		width : 100			  
	});

	if("<?php echo ($item_province); ?>".length>0 ){
		showcity("<?php echo ($item_province); ?>");//初始化市
	}
});

function showcity(province){
	$("#item_city").empty();
	if(province.length>0){
		$("#item_city").append("<option value='' selected>请选择市</option>");
		if("<?php echo ($item_city); ?>".length>0 && "<?php echo ($item_province); ?>"==province){
			$("#item_city").prev().find(".uew-select-text").html("<?php echo ($item_city); ?>");
		}else{
			$("#item_city").prev().find(".uew-select-text").html("请选择市");
		}
		$.getJSON("<?php echo U('itemrate/getcity');?>&province="+province,function(result){
			var data=result.data;
			$.each(data, function(i, v){
				if("<?php echo ($item_city); ?>"==v['city']){
					$("#item_city").append("<option value='"+v['city']+"' selected>"+v['city']+"</option>");
				}else{
					$("#item_city").append("<option value='"+v['city']+"'>"+v['city']+"</option>");
				}
			});
		});
	}
}
</script>
</head>

<body>

	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><a href="<?php echo U('index/welcome');?>">首页</a></li>
			<li><a href="<?php echo U('iteminfo/index');?>">项目管理</a></li>
			<li><a href="#">项目手动打分（项目列表)</a></li>
		</ul>
    </div>
    
    <div class="formbody">
		<ul class="toolbar">
			 
		</ul> 
		<form name="seachform" id="seachform" action="<?php echo U('itemrate/iteminfo');?>" method="post">
			<ul class="seachform">
				<li><label>综合查询</label><input name="info[keyword]" id="keyword" value="<?php echo ($keyword); ?>" type="text" class="scinput" style="width:100px;" /></li>
				<li><label>提交时间</label>
					<input name="info[starttime]" id="starttime" class="dfinput" type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{ $dp.$D(\'endtime\')||\'2100-10-01\' }'})" datatype="*" errormsg="时间范围开始值不能为空！" maxlength="20" style="width: 100px;" readonly value="<?php echo ($starttime); ?>" />-
					<input name="info[endtime]" id="endtime" class="dfinput" type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{ $dp.$D(\'starttime\') }',maxDate:'2100-10-01'})" datatype="*" errormsg="时间范围结束值范围不能为空！" maxlength="20" style="width: 100px;" readonly value="<?php echo ($endtime); ?>" />
					<i class="Validform_checktip"></i></li>
				<li><label>行业分类</label>
					<div class="vocation">
					<select id="indus_id" name="info[indus_id]" datatype="*" errormsg="行业分类不能为空！">
						<option value="" selected>请选择行业分类</option>
						<?php if(is_array($indusinfo)): $key = 0; $__LIST__ = $indusinfo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$data): $mod = ($key % 2 );++$key;?><option value="<?php echo ($data["indus_id"]); ?>" <?php if($data["indus_id"] == $indus_id): ?>selected<?php endif; ?> <?php if($data["childnum"] > 0): ?>disabled<?php endif; ?>><?php echo ($data["indus_title"]); ?></option>
							<?php if($data["childnum"] > 0): if(is_array($data["child"])): $keyc = 0; $__LIST__ = $data["child"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$child): $mod = ($keyc % 2 );++$keyc;?><option value="<?php echo ($child["indus_id"]); ?>" <?php if($child["indus_id"] == $indus_id): ?>selected<?php endif; ?>>--<?php echo ($child["indus_title"]); ?></option><?php endforeach; endif; else: echo "" ;endif; endif; endforeach; endif; else: echo "" ;endif; ?>
					</select></div><i class="Validform_checktip"></i></li>
				<li><label>地域信息</label>
					<div class="vocation">
						<select id="item_province" name="info[item_province]" datatype="*" errormsg="省不能为空！" onchange="showcity(this.value);">
							<option value="" selected>请选择省</option>
							<?php if(is_array($provinces)): $key = 0; $__LIST__ = $provinces;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$data): $mod = ($key % 2 );++$key;?><option value="<?php echo ($data["province"]); ?>" <?php if($data["province"] == $item_province): ?>selected<?php endif; ?>><?php echo ($data["province"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
						</select>
					</div>
					<div class="vocation" style="padding-left:10px;">
						<select id="item_city" name="info[item_city]" datatype="*" errormsg="市不能为空！">
							<option value="">请选择市</option>
						</select>
					</div>
					<i class="Validform_checktip"></i>
				</li>

				<li><label>&nbsp;</label><input name="" type="submit" class="scbtn" value="查询"/></li>
			</ul>
		</form>

		<table class="tablelist">
			<thead>
				<tr>
					<th><input name="" type="checkbox" value="" /></th>
					<th>编号</th>
					<th>项目名称</th>
					<th>公司名称</th>
					<th>联系人</th>
					<th>联系电话</th>
					<th>区域</th>
					<th>行业</th>
					<th>分值</th>
					<th>提交时间</th>					
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<?php if(is_array($listinfo)): $i = 0; $__LIST__ = $listinfo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$item): $mod = ($i % 2 );++$i;?><tr>
					<td><input name="" type="checkbox" value="" /></td>
					<td><?php echo ($item["item_id"]); ?></td>
					<td><?php echo ($item["item_name"]); ?></td>
					<td><?php echo ($item["item_company"]); ?></td>
					<td><?php echo ($item["item_linkmen"]); ?></td>
					<td><?php echo ($item["item_linkphone"]); ?></td>
					<td><?php echo ($item["item_province"]); echo ($item["item_city"]); ?></td>
					<td><?php echo ($item["indus_title"]); ?></td>
					<td><?php echo ($item["score"]); ?></td>
					<td><?php echo (date("Y-m-d H:i:s",$item["item_addtime"])); ?></td>
					<td>
						<a href="<?php echo U('itemrate/handscore',array('item_id'=>$item['item_id']));?>" class="tablelink">手动打分</a>
						<a href="<?php echo U('itemrate/delitem',array('item_id'=>$item['item_id']));?>" onclick="{if(confirm('确认删除?')){return true;}return false;}" class="tablelink">删除</a>
					</td>
				</tr><?php endforeach; endif; else: echo "" ;endif; ?>
			</tbody>
		</table>

		<?php echo ($pageshow); ?>

    </div>
<script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');
</script>
</body>

</html>